package com.by.controller;


import com.by.api.StockClient;
import com.by.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ServivE
 * @version 0.1
 * @className StockController
 * @description
 * @date 2024/11/2 14:01
 * @since jdk17
 */
@RestController
public class StockController implements StockClient {

    @Autowired
    StockService stockService;

//    @Transactional
    @Override
    public int updateStock(int goodsId, int num) {
        int rs = stockService.updateStock(goodsId, num);
        return rs;
    }


}
